home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
dev
/
lang
/
pcq12b.lzh
/
Include
/
Exec
/
Devices.i
< prev
next >
Wrap
Text File
|
1990-08-27
|
946b
|
44 lines
{
Devices.i for PCQ Pascal
}
{$I "Include:Exec/Libraries.i"}
{$I "Include:Exec/Ports.i"}
{***** Device *****************************************************}
type
Device = record
dd_Library : Library;
end;
DevicePtr = ^Device;
{***** Unit *******************************************************}
Unit = record
unit_MsgPort : MsgPort; { queue for unprocessed messages }
{ instance of msgport is recommended }
unit_flags : Byte;
unit_pad : Byte;
unit_OpenCnt : Short; { number of active opens }
end;
UnitPtr = ^Unit;
const
UNITF_ACTIVE = 1;
UNITF_INTASK = 2;
Procedure AddDevice(device : DevicePtr);
External;
Procedure CloseDevice(io : Address); { io is an IORequestPtr }
External;
Function OpenDevice(devName : String; unitNumber : Integer;
io : Address; flags : Integer) : Integer;
External; { io is an IORequestPtr }
Procedure RemDevice(device : DevicePtr);
External;